package com.navinfo.data.journal;

import java.util.ArrayList;
import java.util.List;

/**
 * 趟程节点
 */
public class JournalVertex {
    /**
     * 纬度
     */
    double lat = 0;
    /**
     * 经度
     */
    double lng = 0;
    /**
     * 12级瓦片编号
     */
    long tileNumber = 0;
    /**
     * 停靠时间点列表，每个时间点格式为（时间点：出发返回标志）
     */
    List<String> timelist = new ArrayList<String>();

    public JournalVertex(double lat, double lng) {
        this.lat = lat;
        this.lng = lng;
    }

    public JournalVertex(long tileNumber) {
        this.tileNumber = tileNumber;
    }

    public long getTileNumber() {
        return tileNumber;
    }

    public void setTileNumber(long tileNumber) {
        this.tileNumber = tileNumber;
    }

    public List<String> getTimelist() {
        return timelist;
    }

    public void setTimelist(List timelist) {
        this.timelist = timelist;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public double getLng() {
        return lng;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer().append("(start->");
        for (String res : timelist) {
            sb.append(String.valueOf(res)).append("->");
        }
        sb.append("end)");
        return "JournalVertex[tileNumber=" + tileNumber+",lat=" + lat + ",lng=" + lng + ",timelist=" + sb.toString() + "]";
    }
}
